package DataBase;


import java.sql.*;

public class DAOmysql {

    ResultSet rs;
    Connection con;
    PreparedStatement pstmt;

    public boolean Conectar() throws Exception {
        Class.forName("org.mysql.Driver");
        String url = "jdbc:mysql://localhost:3306/projetos";
        String user = "root";
        String senha = "123456";
        con = DriverManager.getConnection(url, user, senha);
        return true;
    }

    public void Desconectar() throws Exception {
        if (con != null){
            con.close();
        }

    }
}
